<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2019/1/11
 * Time: 16:58
 */

namespace app\storage\model;


use think\Model;

class FileModel extends Model
{
    protected $table = 'iwh_car_file';
    protected $pk = 'id';


    /**根据出库单Uuid获取装车文件相对地址
     * @param $bomUuid
     * @return array|false|\PDOStatement|string|Model
     */
    public function findFileByBomUuid($bomUuid){
        return  $this->where('bom_uuid',$bomUuid)->value('file_path');
    }

    /***
     * 根据出库单uuid获取装车文件对应仓库
     * @param $bomUuid
     * @return mixed
     */
    public function findStorageByBomUuid($bomUuid){
        return  $this->where('bom_uuid',$bomUuid)->value('storage_uuid');
    }

}